package com.mt.roll.wms.params;

import com.mt.roll.core.base.BaseParam;
import com.mt.roll.core.validator.groups.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @Author weihongyang
 * @Date 2020/12/30 14:00
 * @Version 1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "物料参数对象", description = "用于新增和更新物料信息")
public class MaterialParam extends BaseParam {
    /**
     * 主键，自增
     */
    @ApiModelProperty(value = "主键，更新时需要填写", example = "1")
    @NotNull(message = "物料ID不能为空", groups = {UpdateGroup.class})
    private Long id;

    /**
     * 物料编码
     */
    @ApiModelProperty(value = "物料编码", required = true, example = "code")
    @NotBlank(message = "物料编码不能为空")
    private String code;

    /**
     * 物料名称
     */
    @ApiModelProperty(value = "物料名称", required = true, example = "name")
    @NotBlank(message = "物料名称不能为空")
    private String name;


    /**
     * 英文名称
     */
    @ApiModelProperty(value = "英文名称", example = "enName")
    private String enName;

    /**
     * 缩写
     */
    @ApiModelProperty(value = "缩写", example = "abbr")
    private String abbr;

    /**
     * 物料描述
     */
    @ApiModelProperty(value = "物料描述", example = "description")
    private String description;

    /**
     * 物料类型
     */
    @ApiModelProperty(value = "物料类型", example = "category")
    private String category;


    /**
     * 备注
     */
    @ApiModelProperty(value = "备注",example = "remark")
    private String remark;

}
